/***********************************************************************
 * Module:  TypeLONG.java
 * Author:  SilentSkyTA
 * Purpose: Defines the Class TypeLONG
 ***********************************************************************/
package com.tuananh.radnom.model.thresholding;

import java.util.*;

/** @pdOid ec1ae80f-22ce-4a32-9a1d-3644e3386f09 */
public class TypeLONG extends DataType {
	/**
	 * @param value1
	 * @param value2
	 * @pdOid 291b66c9-e2b8-46ad-b8c4-be285805163a
	 */
	public boolean isHigher(String value1, String value2) {
		// TODO: implement
		Long convertedValue1 = (Long) parse(value1), convertedValue2 = (Long) parse(value2);
		if (convertedValue1 > convertedValue2)
			return true;
		else
			return false;
	}

	/**
	 * @param value1
	 * @param value2
	 * @pdOid 46fe0427-b842-490e-a04f-c37b93d06a71
	 */
	public boolean isLower(String value1, String value2) {
		// TODO: implement
		Long convertedValue1 = (Long) parse(value1), convertedValue2 = (Long) parse(value2);
		if (convertedValue1 < convertedValue2)
			return true;
		else
			return false;
	}

	/**
	 * @param value1
	 * @param value2
	 * @pdOid 1db79f23-2e85-40fb-9c17-89566b144ad7
	 */
	public boolean isEqual(String value1, String value2) {
		// TODO: implement
		Long convertedValue1 = (Long) parse(value1), convertedValue2 = (Long) parse(value2);
		if (convertedValue1 == convertedValue2)
			return true;
		else
			return false;
	}

	/**
	 * @param value
	 * @pdOid 4a910b9e-0da3-4e74-96d5-243bcd9f914c
	 */
	public Object parse(String value) {
		// TODO: implement
		return Long.parseLong(value);
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "long";
	}

}